package Interfaz;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wb.swt.SWTResourceManager;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;


/**
 * CU007 - Modificar datos de usuario
 * @author 
 */
public class CU007 {

	protected Shell shlModificarDatos;
	private Text text;
	private Text text_4;
	private Text text_5;

	/**
	 * Launch the application.
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			CU007 window = new CU007();
			window.open();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Open the window.
	 */
	public void open() {
		Display display = Display.getDefault();
		createContents();
		
		// Centrar ventana
		Monitor primary = display.getPrimaryMonitor();
		Rectangle bounds = primary.getBounds();
		Rectangle rect = shlModificarDatos.getBounds();	    
		int x = bounds.x + (bounds.width - rect.width) / 2;
		int y = bounds.y + (bounds.height - rect.height) / 2;	    
		shlModificarDatos.setLocation(x, y);
		
		Combo combo_3 = new Combo(shlModificarDatos, SWT.READ_ONLY);
		combo_3.setItems(new String[] {"D.N.I.", "L.C.", "L.E."});
		combo_3.setBounds(124, 140, 59, 23);
		
		Label label_3 = new Label(shlModificarDatos, SWT.NONE);
		label_3.setText("N\u00FAmero de documento:");
		label_3.setBounds(258, 143, 128, 15);
		
		text = new Text(shlModificarDatos, SWT.BORDER);
		text.setBounds(392, 140, 101, 21);
		
		Label lblTipoDeDocumento = new Label(shlModificarDatos, SWT.NONE);
		lblTipoDeDocumento.setText("Tipo de documento:");
		lblTipoDeDocumento.setBounds(10, 143, 108, 15);
		
		Label lblNombre = new Label(shlModificarDatos, SWT.NONE);
		lblNombre.setText("Nombre:");
		lblNombre.setBounds(10, 103, 47, 15);
		
		Label lblApellido = new Label(shlModificarDatos, SWT.NONE);
		lblApellido.setText("Apellido:");
		lblApellido.setBounds(10, 63, 47, 15);
		
		text_4 = new Text(shlModificarDatos, SWT.BORDER);
		text_4.setBounds(63, 60, 219, 21);
		
		Label lblCorreoElectrnico = new Label(shlModificarDatos, SWT.NONE);
		lblCorreoElectrnico.setText("Correo electr\u00F3nico:");
		lblCorreoElectrnico.setBounds(10, 23, 101, 15);
		
		text_5 = new Text(shlModificarDatos, SWT.BORDER);
		text_5.setBounds(63, 100, 219, 21);
		
		Label label = new Label(shlModificarDatos, SWT.NONE);
		label.setText("Pa\u00EDs:");
		label.setBounds(10, 183, 24, 15);
		
		Combo combo = new Combo(shlModificarDatos, SWT.READ_ONLY);
		combo.setItems(new String[] {"Afganistan", "Africa del Sur", "Albania", "Alemania", "Andorra", "Angola", "Antigua y Barbuda", "Antillas Holandesas", "Arabia Saudita", "Argelia", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarusia", "Belgica"});
		combo.setBounds(40, 180, 128, 23);
		
		Label label_1 = new Label(shlModificarDatos, SWT.NONE);
		label_1.setText("Estado/Provincia:");
		label_1.setBounds(10, 223, 92, 15);
		
		Combo combo_1 = new Combo(shlModificarDatos, SWT.READ_ONLY);
		combo_1.setItems(new String[] {"Buenos Aires", "Catamarca", "C\u00F3rdoba", "Corrientes", "Chaco", "Chubut", "Entre R\u00EDos", "Formosa", "Jujuy", "La Pampa", "La Rioja", "Mendoza", "Misiones", "Neuqu\u00E9n", "R\u00EDo Negro", "Salta", "San Juan", "San Luis", "Santa Cruz", "Santa Fe", "Santiago del Estero", "Tierra del Fuego", "Tucum\u00E1n"});
		combo_1.setBounds(108, 220, 128, 23);
		
		Label label_2 = new Label(shlModificarDatos, SWT.NONE);
		label_2.setText("Localidad:");
		label_2.setBounds(10, 263, 55, 15);
		
		Combo combo_2 = new Combo(shlModificarDatos, SWT.READ_ONLY);
		combo_2.setItems(new String[] {"Paran\u00E1", "Santa Fe", "Santo Tom\u00E9"});
		combo_2.setBounds(71, 260, 128, 23);
		
		Label lblPepitogmailcom = new Label(shlModificarDatos, SWT.NONE);
		lblPepitogmailcom.setFont(SWTResourceManager.getFont("Segoe UI", 9, SWT.BOLD));
		lblPepitogmailcom.setBounds(117, 23, 108, 15);
		lblPepitogmailcom.setText("pepito@gmail.com");
		
		Button btnGuardar = new Button(shlModificarDatos, SWT.NONE);
		btnGuardar.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
			}
		});
		btnGuardar.setText("Aceptar");
		btnGuardar.setBounds(232, 327, 108, 32);
		
		Button button_1 = new Button(shlModificarDatos, SWT.NONE);
		button_1.setText("Cancelar");
		button_1.setBounds(376, 327, 108, 32);
		
		shlModificarDatos.open();
		shlModificarDatos.layout();
		while (!shlModificarDatos.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
	}

	/**
	 * Create contents of the window.
	 */
	protected void createContents() {
		shlModificarDatos = new Shell(SWT.CLOSE | SWT.TITLE | SWT.MIN);
		shlModificarDatos.setSize(512, 409);
		shlModificarDatos.setText("Modificar datos");

	}

}
